package com.ymttest.database.mapping.thirdpartysync;

import com.ymttest.database.model.thirdpartysync.promoterproductcommission;
import com.ymttest.database.model.thirdpartysync.promoterproductcommissionExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface promoterproductcommissionMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterproductcommissionSqlProvider.class, method="countByExample")
    int countByExample(promoterproductcommissionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @DeleteProvider(type=promoterproductcommissionSqlProvider.class, method="deleteByExample")
    int deleteByExample(promoterproductcommissionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Delete({
        "delete from promoterproductcommission",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Insert({
        "insert into promoterproductcommission (Id, ProductId, ",
        "Pid, Commission, ",
        "StartTime, EndTime)",
        "values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=VARCHAR}, ",
        "#{pid,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, ",
        "#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})"
    })
    int insert(promoterproductcommission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @InsertProvider(type=promoterproductcommissionSqlProvider.class, method="insertSelective")
    int insertSelective(promoterproductcommission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterproductcommissionSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="Commission", property="commission", jdbcType=JdbcType.DECIMAL),
        @Result(column="StartTime", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="EndTime", property="endTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<promoterproductcommission> selectByExample(promoterproductcommissionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Select({
        "select",
        "Id, ProductId, Pid, Commission, StartTime, EndTime",
        "from promoterproductcommission",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="Commission", property="commission", jdbcType=JdbcType.DECIMAL),
        @Result(column="StartTime", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="EndTime", property="endTime", jdbcType=JdbcType.TIMESTAMP)
    })
    promoterproductcommission selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductcommissionSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") promoterproductcommission record, @Param("example") promoterproductcommissionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductcommissionSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") promoterproductcommission record, @Param("example") promoterproductcommissionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductcommissionSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(promoterproductcommission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproductcommission
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Update({
        "update promoterproductcommission",
        "set ProductId = #{productId,jdbcType=VARCHAR},",
          "Pid = #{pid,jdbcType=VARCHAR},",
          "Commission = #{commission,jdbcType=DECIMAL},",
          "StartTime = #{startTime,jdbcType=TIMESTAMP},",
          "EndTime = #{endTime,jdbcType=TIMESTAMP}",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(promoterproductcommission record);
}